package me.apidemo.a04regexdemo1;

public class RegexDemo5 {
    public static void main(String[] args) {
        String s = "小诗诗dqwefqwfqwfwq12312小丹丹dqwefqwfqwfwq12312小惠惠";
        String result1 = s.replaceAll("[\\w&&[^_]]+", "vs");
        System.out.println(result1);
        String[] arr = s.split("[\\w&&[^_]]+");
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
